LOGO |
|
| Tableau Prep File Name: Superstore.tflx |
|
|
Counts
|
|
|---|---|
| Connections # | 6 |
| Input Steps # | 6 |
| Output Steps # | 2 |
| Input Fields # | 122 |
| Union Steps # | 1 |
| Join Steps # | 2 |
| Pivot Steps # | 1 |
| Aggregate Steps # | 1 |
| Clean Steps # | 6 |
| Actions # | 38 |
|
Name
|
Connection Type
|
Is Packaged?
|
File Name
|
|---|---|---|---|
| Orders_Central.csv | .v1.SqlConnection | true | |
| orders_south_2015.csv | .v1.SqlConnection | true | |
| return reasons_new.xlsx | .v1.SqlConnection | true | |
| Orders_West.csv | .v1.SqlConnection | true | |
| Orders_East.xlsx | .v1.SqlConnection | true | |
| Quota.xlsx | .v1.SqlConnection | true |
Flow to Create 'Annual Regional Performance.hyper' Output |
Section 1 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 5 |
| Pivot Steps # | 1 |
| Actions # | 1 |
Step Type | Connection Name |
|---|---|
| LoadExcel | Quota.xlsx |
Field Name | Field Type | Collation |
|---|---|---|
| Region | string | LEN_RIN_S2 |
| 2015 | integer | |
| 2016 | integer | |
| 2017 | integer | |
| 2018 | integer |
Step Name | Actions - After Pivot | Groups | Use Smart Defaults |
|---|---|---|---|
| Pivot Quotas | Change Year to Number (whole) 1 (ChangeColumnType) - Default | [{"expressions":[{"bindings":[{"bindingType":"literal","newColumnName":"Year","groupName":"2015"},{"bindingType":"column","newColumnName":"Quota","columnName":"2015"}]},{"bindings":[{"bindingType":"literal","newColumnName":"Year","groupName":"2016"},{"bindingType":"column","newColumnName":"Quota","columnName":"2016"}]},{"bindings":[{"bindingType":"literal","newColumnName":"Year","groupName":"2018"},{"bindingType":"column","newColumnName":"Quota","columnName":"2018"}]},{"bindings":[{"bindingType":"literal","newColumnName":"Year","groupName":"2017"},{"bindingType":"column","newColumnName":"Quota","columnName":"2017"}]}]}] | false |
Action Name | Column Name | Type | Calculation |
|---|---|---|---|
| Change Year to Number (whole) 1 | Year | integer |
Section 2 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 24 |
| Clean Steps # | 1 |
| Actions # | 13 |
Step Type | Connection Name | Contains Header |
|---|---|---|
| LoadCsv | Orders_Central.csv | true |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| State | string | LEN_RUS |
| Postal Code | integer | |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product | string | LEN_RUS |
| Sales | real | |
| Quantity | integer | |
| Profit | real | |
| Order Year | integer | |
| Order Month | integer | |
| Order Day | integer | |
| Ship Year | integer | |
| Ship Month | integer | |
| Ship Day | integer | |
| Discounts | string | LEN_RUS |
|
Clean Action
|
Node Type
|
|---|---|
| Remove Order Day | RemoveColumn |
| renamed Discounts to Discount | RenameColumn |
| Remove Ship Month | RemoveColumn |
| Remove Ship Day | RemoveColumn |
| Add Order Date | AddColumn |
| change Order Date to date | ChangeColumnType |
| Remove Order Month | RemoveColumn |
| change Ship Date to date | ChangeColumnType |
| Add Region | AddColumn |
| Remove Order Year | RemoveColumn |
| Add Ship Date | AddColumn |
| renamed Product to Product Name | RenameColumn |
| Remove Ship Year | RemoveColumn |
Action Name | Column Name |
|---|---|
| Remove Order Day | Order Day |
| Remove Ship Month | Ship Month |
| Remove Ship Day | Ship Day |
| Remove Order Month | Order Month |
| Remove Order Year | Order Year |
| Remove Ship Year | Ship Year |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Discounts to Discount | Discounts | Discount |
| renamed Product to Product Name | Product | Product Name |
Action Name | Column Name | Expression |
|---|---|---|
| Add Order Date | Order Date | (STR([Order Day])+"/"+STR([Order Month])+"/"+STR([Order Year])) |
| Add Region | Region | "Central" |
| Add Ship Date | Ship Date | STR([Ship Day])+"/"+STR([Ship Month])+"/"+STR([Ship Year]) |
Action Name | Column Name | Type | Calculation |
|---|---|---|---|
| change Order Date to date | Order Date | date | IF NOT ISNULL(DATE(DATEPARSE("dd/MM/yyyy",[Order Date]))) THEN DATE(DATEPARSE("dd/MM/yyyy",[Order Date])) ELSEIF NOT ISNULL(DATE([Order Date])) THEN DATE([Order Date]) ELSE NULL END |
| change Ship Date to date | Ship Date | date | IF NOT ISNULL(DATE(DATEPARSE("dd/MM/yyyy",[Ship Date]))) THEN DATE(DATEPARSE("dd/MM/yyyy",[Ship Date])) ELSEIF NOT ISNULL(DATE([Ship Date])) THEN DATE([Ship Date]) ELSE NULL END |
Section 3 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 22 |
| Clean Steps # | 1 |
| Actions # | 1 |
Step Type | Connection Name | Contains Header |
|---|---|---|
| LoadCsvInputUnion | orders_south_2015.csv | true |
Field Name | Field Type | Collation |
|---|---|---|
| Sales | real | |
| Quantity | integer | |
| Profit | real | |
| Discount | real | |
| Region | string | LEN_RUS |
| State | string | LEN_RUS |
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Order Date | datetime | |
| Ship Date | datetime | |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| Postal Code | integer | |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product Name | string | LEN_RUS |
| File Paths | string | LEN_RUS |
|
Clean Action
|
Node Type
|
|---|---|
| Exclude Order ID:null | RangeFilter |
Action Name | Ranges |
|---|---|
| Exclude Order ID:null | Order ID-->[{"startValue":null,"includeStart":true,"endValue":null,"includeEnd":true}] |
Section 4 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 21 |
| Clean Steps # | 1 |
| Actions # | 3 |
Step Type | Connection Name |
|---|---|
| LoadExcel | Orders_East.xlsx |
Field Name | Field Type | Collation |
|---|---|---|
| Category | string | LEN_RIN_S2 |
| City | string | LEN_RIN_S2 |
| Country | string | LEN_RIN_S2 |
| Customer ID | string | LEN_RIN_S2 |
| Customer Name | string | LEN_RIN_S2 |
| Discount | real | |
| Order Date | date | |
| Order ID | string | LEN_RIN_S2 |
| Postal Code | integer | |
| Product ID | string | LEN_RIN_S2 |
| Product Name | string | LEN_RIN_S2 |
| Profit | real | |
| Quantity | integer | |
| Region | string | LEN_RIN_S2 |
| Row ID | integer | |
| Segment | string | LEN_RIN_S2 |
| Ship Date | date | |
| Ship Mode | string | LEN_RIN_S2 |
| State | string | LEN_RIN_S2 |
| Sub-Category | string | LEN_RIN_S2 |
| Sales | string | LEN_RIN_S2 |
|
Clean Action
|
Node Type
|
|---|---|
| change Discount to string 1 | ChangeColumnType |
| Quick Calc 1 | QuickCalcColumn |
| change Sales to real 1 | ChangeColumnType |
Action Name | Column Name | Type | Calculation |
|---|---|---|---|
| change Discount to string 1 | Discount | string | |
| change Sales to real 1 | Sales | real |
Action Name | Column Name | Expression | Calc. Expression Type |
|---|---|---|---|
| Quick Calc 1 | Sales | REGEXP_REPLACE([Sales], '[:Letter:]', '') | RemoveLetters |
Section 5 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 41 |
| Clean Steps # | 1 |
| Actions # | 2 |
Step Type | Connection Name | Actions | Contains Header |
|---|---|---|---|
| LoadCsv | Orders_West.csv | RemoveColumns | true |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Order Date | datetime | |
| Ship Date | datetime | |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| Postal Code | integer | |
| Region | string | LEN_RUS |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product Name | string | LEN_RUS |
| Sales | real | |
| Quantity | integer | |
| Discount | real | |
| Profit | real | |
| Right_Row ID | integer | |
| Right_Order Date | datetime | |
| Right_Ship Date | datetime | |
| Right_Ship Mode | string | LEN_RUS |
| Right_Customer ID | string | LEN_RUS |
| Right_Customer Name | string | LEN_RUS |
| Right_Segment | string | LEN_RUS |
| Right_Country | string | LEN_RUS |
| Right_City | string | LEN_RUS |
| Right_State2 | string | LEN_RUS |
| Right_Postal Code | integer | |
| Right_Region | string | LEN_RUS |
| Right_Product ID | string | LEN_RUS |
| Right_Category | string | LEN_RUS |
| Right_Sub-Category | string | LEN_RUS |
| Right_Product Name | string | LEN_RUS |
| Right_Sales | real | |
| Right_Quantity | integer | |
| Right_Discount | real | |
| Right_Profit | real | |
| State | string | LEN_RUS |
Column Names |
|---|
| Right_Row ID |
| Right_Order Date |
| Right_Ship Date |
| Right_Ship Mode |
| Right_Customer ID |
| Right_Customer Name |
| Right_Segment |
| Right_Country |
| Right_City |
| Right_State2 |
| Right_Postal Code |
| Right_Region |
| Right_Product ID |
| Right_Category |
| Right_Sub-Category |
| Right_Product Name |
| Right_Sales |
| Right_Quantity |
| Right_Discount |
| Right_Profit |
|
Clean Action
|
Node Type
|
|---|---|
| 18 values replaced with 9 values. | Remap |
Action Name | Column Name | Values |
|---|---|---|
| 18 values replaced with 9 values. | State | {"\"Arizona\"":["\"AZ\"","\"Arizona\""],"\"California\"":["\"CA\"","\"California\""],"\"Colorado\"":["\"CO\"","\"Colorado\""],"\"Idaho\"":["\"ID\"","\"Idaho\""],"\"Montana\"":["\"MT\"","\"Montana\""],"\"New Mexico\"":["\"NM\"","\"New Mexico\""],"\"Oregon\"":["\"OR\"","\"Oregon\""],"\"Washington\"":["\"WA\"","\"Washington\""],"\"Utah\"":["\"UT\"","\"Utah\""]} |
Section 6 |
Counts | |
|---|---|
| Union Steps # | 1 |
Step Name | Sources |
|---|---|
| All Orders | Fix Dates Remove Nulls Fix Data Type Rename States |
Section 7 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 9 |
| Clean Steps # | 1 |
| Actions # | 7 |
Step Type | Connection Name | Actions |
|---|---|---|
| LoadExcel | return reasons_new.xlsx | RemoveColumns |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order Date | string | LEN_RIN_S2 |
| Order ID | string | LEN_RIN_S2 |
| Product ID | string | LEN_RIN_S2 |
| Sub-Category | string | LEN_RIN_S2 |
| Manufacturer | string | LEN_RIN_S2 |
| Product Name | string | LEN_RIN_S2 |
| Return Reason | string | LEN_RIN_S2 |
| Notes | string | LEN_RIN_S2 |
Column Names |
|---|
| Row ID |
| Order Date |
| Sub-Category |
| Manufacturer |
| Product Name |
|
Clean Action
|
Node Type
|
|---|---|
| renamed Notes - Split 2 to Approver | RenameColumn |
| Remove Notes | RemoveColumn |
| renamed Notes - Split 1 to Return Notes | RenameColumn |
| Clean 1 | Remap |
| Add Notes - Split 1 | AddColumn |
| Add Notes - Split 2 | AddColumn |
Action Name | Column Name |
|---|---|
| Remove Notes | Notes |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Notes - Split 2 to Approver | Notes - Split 2 | Approver |
| renamed Notes - Split 1 to Return Notes | Notes - Split 1 | Return Notes |
Action Name | Column Name | Expression |
|---|---|---|
| Add Notes - Split 1 | Notes - Split 1 | TRIM( SPLIT( [Notes], "-", 1 ) ) |
| Add Notes - Split 2 | Notes - Split 2 | TRIM( SPLIT( [Notes], "-", 2 ) ) |
Action Name | Column Name | Values |
|---|---|---|
| Clean 1 | Approver | {"\"M Gomez\"":["\"M/ Gomez\"","\"M. Gomez\"","\"M Gomez\""],"\"S Kelly\"":["\"S Kelly\"","\"S. Kelly\""],"\"F Azad\"":["\"F. Azad\"","\"F Azad\""],"\"L Smith\"":["\"L. Smith\"","\"L Smith\""],"\"G Lindsay\"":["\"G. Lindsay\"","\"G Lindsay\""],"\"R Chen\"":["\"R Chen\"","\"R. Chen\""],"\"K Lawrence\"":["\"K. Lawrence\"","\"K Lawrence\""],"\"L Jenkins\"":["\"L. Jenkins\"","\"L Jenkins\""],"\"R Duchesne\"":["\"R. Duchesne\"","\"R Duchesne\""]} |
Section 8 |
Counts | |
|---|---|
| Join Steps # | 1 |
| Aggregate Steps # | 1 |
| Clean Steps # | 1 |
| Actions # | 11 |
Step Name | Actions - Before Join | Conditions | Join Type | Sources |
|---|---|---|---|---|
| Orders + Returns | Change Discount to Number (decimal) 1 (ChangeColumnType) - Right Add Days to Ship (AddColumn) - Right Add Returned? (AddColumn) - Left Remove Table Names 1 (RemoveColumns) - Right Remove File Paths 1 (RemoveColumns) - Right Add Discount (AddColumn) - Right Add Year of Sale (AddColumn) - Right Exclude Discount:(17 - 18) 1 (RangeFilter) - Right | [{"leftExpression":"[Product ID]","rightExpression":"[Product ID]","comparator":"=="},{"leftExpression":"[Order ID]","rightExpression":"[Order ID]","comparator":"=="}] | right | All Orders Clean Notes/Approver |
Action Name | Column Names | Is Before | Name Space |
|---|---|---|---|
| Remove Table Names 1 | Table Names | true | Right |
| Remove File Paths 1 | File Paths | true | Right |
Action Name | Ranges | Is Before | Name Space |
|---|---|---|---|
| Exclude Discount:(17 - 18) 1 | Discount-->[{"startValue":"17.0","includeStart":true,"endValue":"18.0","includeEnd":false}] | true | Right |
Action Name | Column Name | Expression | Is Before | Name Space |
|---|---|---|---|---|
| Add Days to Ship | Days to Ship | DATEDIFF('day',[Order Date],[Ship Date]) | true | Right |
| Add Returned? | Returned? | IF ISNULL([Return Reason]) = false THEN "Yes" ELSE "No" END | true | Left |
| Add Discount | Discount | IFNULL([Discount],0) | true | Right |
| Add Year of Sale | Year of Sale | YEAR([Order Date]) | true | Right |
Action Name | Column Name | Type | Calculation | Is Before | Name Space |
|---|---|---|---|---|---|
| Change Discount to Number (decimal) 1 | Discount | real | true | Right |
|
Clean Action
|
Node Type
|
|---|---|
| renamed Product ID-1 to Product ID 1 | RenameColumn |
| Remove Product ID 1 | RemoveColumns |
| Remove Order ID-1 1 | RemoveColumns |
Action Name | Column Names |
|---|---|
| Remove Product ID 1 | Product ID |
| Remove Order ID-1 1 | Order ID-1 |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Product ID-1 to Product ID 1 | Product ID-1 | Product ID |
Step Name | Group By Fields | Aggregate Fields |
|---|---|---|
| Roll Up Sales | Region, Year of Sale | Profit - SUM, Sales - SUM, Quantity - SUM, Discount - AVG |
Section 9 |
Counts | |
|---|---|
| Output Steps # | 1 |
| Join Steps # | 1 |
Step Name | Conditions | Join Type | Sources |
|---|---|---|---|
| Quota + Orders | [{"leftExpression":"[Region]","rightExpression":"[Region]","comparator":"=="},{"leftExpression":"[Year]","rightExpression":"[Year of Sale]","comparator":"=="}] | inner | Pivot Quotas Roll Up Sales |
Step Name | Step Type | Hyper Output File | TDS Output |
|---|---|---|---|
| Create 'Annual Regional Performance.hyper' | WriteToHyper | ~/My Tableau Prep Repository/Datasources/Annual Regional Performance.hyper | ~/My Tableau Prep Repository/Datasources/Annual Regional Performance.tds |
Flow to Create 'Superstore Sales.hyper' Output |
Section 10 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 24 |
| Clean Steps # | 1 |
| Actions # | 13 |
Step Type | Connection Name | Contains Header |
|---|---|---|
| LoadCsv | Orders_Central.csv | true |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| State | string | LEN_RUS |
| Postal Code | integer | |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product | string | LEN_RUS |
| Sales | real | |
| Quantity | integer | |
| Profit | real | |
| Order Year | integer | |
| Order Month | integer | |
| Order Day | integer | |
| Ship Year | integer | |
| Ship Month | integer | |
| Ship Day | integer | |
| Discounts | string | LEN_RUS |
|
Clean Action
|
Node Type
|
|---|---|
| Remove Order Day | RemoveColumn |
| renamed Discounts to Discount | RenameColumn |
| Remove Ship Month | RemoveColumn |
| Remove Ship Day | RemoveColumn |
| Add Order Date | AddColumn |
| change Order Date to date | ChangeColumnType |
| Remove Order Month | RemoveColumn |
| change Ship Date to date | ChangeColumnType |
| Add Region | AddColumn |
| Remove Order Year | RemoveColumn |
| Add Ship Date | AddColumn |
| renamed Product to Product Name | RenameColumn |
| Remove Ship Year | RemoveColumn |
Action Name | Column Name |
|---|---|
| Remove Order Day | Order Day |
| Remove Ship Month | Ship Month |
| Remove Ship Day | Ship Day |
| Remove Order Month | Order Month |
| Remove Order Year | Order Year |
| Remove Ship Year | Ship Year |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Discounts to Discount | Discounts | Discount |
| renamed Product to Product Name | Product | Product Name |
Action Name | Column Name | Expression |
|---|---|---|
| Add Order Date | Order Date | (STR([Order Day])+"/"+STR([Order Month])+"/"+STR([Order Year])) |
| Add Region | Region | "Central" |
| Add Ship Date | Ship Date | STR([Ship Day])+"/"+STR([Ship Month])+"/"+STR([Ship Year]) |
Action Name | Column Name | Type | Calculation |
|---|---|---|---|
| change Order Date to date | Order Date | date | IF NOT ISNULL(DATE(DATEPARSE("dd/MM/yyyy",[Order Date]))) THEN DATE(DATEPARSE("dd/MM/yyyy",[Order Date])) ELSEIF NOT ISNULL(DATE([Order Date])) THEN DATE([Order Date]) ELSE NULL END |
| change Ship Date to date | Ship Date | date | IF NOT ISNULL(DATE(DATEPARSE("dd/MM/yyyy",[Ship Date]))) THEN DATE(DATEPARSE("dd/MM/yyyy",[Ship Date])) ELSEIF NOT ISNULL(DATE([Ship Date])) THEN DATE([Ship Date]) ELSE NULL END |
Section 11 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 22 |
| Clean Steps # | 1 |
| Actions # | 1 |
Step Type | Connection Name | Contains Header |
|---|---|---|
| LoadCsvInputUnion | orders_south_2015.csv | true |
Field Name | Field Type | Collation |
|---|---|---|
| Sales | real | |
| Quantity | integer | |
| Profit | real | |
| Discount | real | |
| Region | string | LEN_RUS |
| State | string | LEN_RUS |
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Order Date | datetime | |
| Ship Date | datetime | |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| Postal Code | integer | |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product Name | string | LEN_RUS |
| File Paths | string | LEN_RUS |
|
Clean Action
|
Node Type
|
|---|---|
| Exclude Order ID:null | RangeFilter |
Action Name | Ranges |
|---|---|
| Exclude Order ID:null | Order ID-->[{"startValue":null,"includeStart":true,"endValue":null,"includeEnd":true}] |
Section 12 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 21 |
| Clean Steps # | 1 |
| Actions # | 3 |
Step Type | Connection Name |
|---|---|
| LoadExcel | Orders_East.xlsx |
Field Name | Field Type | Collation |
|---|---|---|
| Category | string | LEN_RIN_S2 |
| City | string | LEN_RIN_S2 |
| Country | string | LEN_RIN_S2 |
| Customer ID | string | LEN_RIN_S2 |
| Customer Name | string | LEN_RIN_S2 |
| Discount | real | |
| Order Date | date | |
| Order ID | string | LEN_RIN_S2 |
| Postal Code | integer | |
| Product ID | string | LEN_RIN_S2 |
| Product Name | string | LEN_RIN_S2 |
| Profit | real | |
| Quantity | integer | |
| Region | string | LEN_RIN_S2 |
| Row ID | integer | |
| Segment | string | LEN_RIN_S2 |
| Ship Date | date | |
| Ship Mode | string | LEN_RIN_S2 |
| State | string | LEN_RIN_S2 |
| Sub-Category | string | LEN_RIN_S2 |
| Sales | string | LEN_RIN_S2 |
|
Clean Action
|
Node Type
|
|---|---|
| change Discount to string 1 | ChangeColumnType |
| Quick Calc 1 | QuickCalcColumn |
| change Sales to real 1 | ChangeColumnType |
Action Name | Column Name | Type | Calculation |
|---|---|---|---|
| change Discount to string 1 | Discount | string | |
| change Sales to real 1 | Sales | real |
Action Name | Column Name | Expression | Calc. Expression Type |
|---|---|---|---|
| Quick Calc 1 | Sales | REGEXP_REPLACE([Sales], '[:Letter:]', '') | RemoveLetters |
Section 13 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 41 |
| Clean Steps # | 1 |
| Actions # | 2 |
Step Type | Connection Name | Actions | Contains Header |
|---|---|---|---|
| LoadCsv | Orders_West.csv | RemoveColumns | true |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order ID | string | LEN_RUS |
| Order Date | datetime | |
| Ship Date | datetime | |
| Ship Mode | string | LEN_RUS |
| Customer ID | string | LEN_RUS |
| Customer Name | string | LEN_RUS |
| Segment | string | LEN_RUS |
| Country | string | LEN_RUS |
| City | string | LEN_RUS |
| Postal Code | integer | |
| Region | string | LEN_RUS |
| Product ID | string | LEN_RUS |
| Category | string | LEN_RUS |
| Sub-Category | string | LEN_RUS |
| Product Name | string | LEN_RUS |
| Sales | real | |
| Quantity | integer | |
| Discount | real | |
| Profit | real | |
| Right_Row ID | integer | |
| Right_Order Date | datetime | |
| Right_Ship Date | datetime | |
| Right_Ship Mode | string | LEN_RUS |
| Right_Customer ID | string | LEN_RUS |
| Right_Customer Name | string | LEN_RUS |
| Right_Segment | string | LEN_RUS |
| Right_Country | string | LEN_RUS |
| Right_City | string | LEN_RUS |
| Right_State2 | string | LEN_RUS |
| Right_Postal Code | integer | |
| Right_Region | string | LEN_RUS |
| Right_Product ID | string | LEN_RUS |
| Right_Category | string | LEN_RUS |
| Right_Sub-Category | string | LEN_RUS |
| Right_Product Name | string | LEN_RUS |
| Right_Sales | real | |
| Right_Quantity | integer | |
| Right_Discount | real | |
| Right_Profit | real | |
| State | string | LEN_RUS |
Column Names |
|---|
| Right_Row ID |
| Right_Order Date |
| Right_Ship Date |
| Right_Ship Mode |
| Right_Customer ID |
| Right_Customer Name |
| Right_Segment |
| Right_Country |
| Right_City |
| Right_State2 |
| Right_Postal Code |
| Right_Region |
| Right_Product ID |
| Right_Category |
| Right_Sub-Category |
| Right_Product Name |
| Right_Sales |
| Right_Quantity |
| Right_Discount |
| Right_Profit |
|
Clean Action
|
Node Type
|
|---|---|
| 18 values replaced with 9 values. | Remap |
Action Name | Column Name | Values |
|---|---|---|
| 18 values replaced with 9 values. | State | {"\"Arizona\"":["\"AZ\"","\"Arizona\""],"\"California\"":["\"CA\"","\"California\""],"\"Colorado\"":["\"CO\"","\"Colorado\""],"\"Idaho\"":["\"ID\"","\"Idaho\""],"\"Montana\"":["\"MT\"","\"Montana\""],"\"New Mexico\"":["\"NM\"","\"New Mexico\""],"\"Oregon\"":["\"OR\"","\"Oregon\""],"\"Washington\"":["\"WA\"","\"Washington\""],"\"Utah\"":["\"UT\"","\"Utah\""]} |
Section 14 |
Counts | |
|---|---|
| Union Steps # | 1 |
Step Name | Sources |
|---|---|
| All Orders | Fix Dates Remove Nulls Fix Data Type Rename States |
Section 15 |
Counts | |
|---|---|
| Input Steps # | 1 |
| Input Fields # | 9 |
| Clean Steps # | 1 |
| Actions # | 7 |
Step Type | Connection Name | Actions |
|---|---|---|
| LoadExcel | return reasons_new.xlsx | RemoveColumns |
Field Name | Field Type | Collation |
|---|---|---|
| Row ID | integer | |
| Order Date | string | LEN_RIN_S2 |
| Order ID | string | LEN_RIN_S2 |
| Product ID | string | LEN_RIN_S2 |
| Sub-Category | string | LEN_RIN_S2 |
| Manufacturer | string | LEN_RIN_S2 |
| Product Name | string | LEN_RIN_S2 |
| Return Reason | string | LEN_RIN_S2 |
| Notes | string | LEN_RIN_S2 |
Column Names |
|---|
| Row ID |
| Order Date |
| Sub-Category |
| Manufacturer |
| Product Name |
|
Clean Action
|
Node Type
|
|---|---|
| renamed Notes - Split 2 to Approver | RenameColumn |
| Remove Notes | RemoveColumn |
| renamed Notes - Split 1 to Return Notes | RenameColumn |
| Clean 1 | Remap |
| Add Notes - Split 1 | AddColumn |
| Add Notes - Split 2 | AddColumn |
Action Name | Column Name |
|---|---|
| Remove Notes | Notes |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Notes - Split 2 to Approver | Notes - Split 2 | Approver |
| renamed Notes - Split 1 to Return Notes | Notes - Split 1 | Return Notes |
Action Name | Column Name | Expression |
|---|---|---|
| Add Notes - Split 1 | Notes - Split 1 | TRIM( SPLIT( [Notes], "-", 1 ) ) |
| Add Notes - Split 2 | Notes - Split 2 | TRIM( SPLIT( [Notes], "-", 2 ) ) |
Action Name | Column Name | Values |
|---|---|---|
| Clean 1 | Approver | {"\"M Gomez\"":["\"M/ Gomez\"","\"M. Gomez\"","\"M Gomez\""],"\"S Kelly\"":["\"S Kelly\"","\"S. Kelly\""],"\"F Azad\"":["\"F. Azad\"","\"F Azad\""],"\"L Smith\"":["\"L. Smith\"","\"L Smith\""],"\"G Lindsay\"":["\"G. Lindsay\"","\"G Lindsay\""],"\"R Chen\"":["\"R Chen\"","\"R. Chen\""],"\"K Lawrence\"":["\"K. Lawrence\"","\"K Lawrence\""],"\"L Jenkins\"":["\"L. Jenkins\"","\"L Jenkins\""],"\"R Duchesne\"":["\"R. Duchesne\"","\"R Duchesne\""]} |
Section 16 |
Counts | |
|---|---|
| Output Steps # | 1 |
| Join Steps # | 1 |
| Clean Steps # | 1 |
| Actions # | 11 |
Step Name | Actions - Before Join | Conditions | Join Type | Sources |
|---|---|---|---|---|
| Orders + Returns | Change Discount to Number (decimal) 1 (ChangeColumnType) - Right Add Days to Ship (AddColumn) - Right Add Returned? (AddColumn) - Left Remove Table Names 1 (RemoveColumns) - Right Remove File Paths 1 (RemoveColumns) - Right Add Discount (AddColumn) - Right Add Year of Sale (AddColumn) - Right Exclude Discount:(17 - 18) 1 (RangeFilter) - Right | [{"leftExpression":"[Product ID]","rightExpression":"[Product ID]","comparator":"=="},{"leftExpression":"[Order ID]","rightExpression":"[Order ID]","comparator":"=="}] | right | All Orders Clean Notes/Approver |
Action Name | Column Names | Is Before | Name Space |
|---|---|---|---|
| Remove Table Names 1 | Table Names | true | Right |
| Remove File Paths 1 | File Paths | true | Right |
Action Name | Ranges | Is Before | Name Space |
|---|---|---|---|
| Exclude Discount:(17 - 18) 1 | Discount-->[{"startValue":"17.0","includeStart":true,"endValue":"18.0","includeEnd":false}] | true | Right |
Action Name | Column Name | Expression | Is Before | Name Space |
|---|---|---|---|---|
| Add Days to Ship | Days to Ship | DATEDIFF('day',[Order Date],[Ship Date]) | true | Right |
| Add Returned? | Returned? | IF ISNULL([Return Reason]) = false THEN "Yes" ELSE "No" END | true | Left |
| Add Discount | Discount | IFNULL([Discount],0) | true | Right |
| Add Year of Sale | Year of Sale | YEAR([Order Date]) | true | Right |
Action Name | Column Name | Type | Calculation | Is Before | Name Space |
|---|---|---|---|---|---|
| Change Discount to Number (decimal) 1 | Discount | real | true | Right |
|
Clean Action
|
Node Type
|
|---|---|
| renamed Product ID-1 to Product ID 1 | RenameColumn |
| Remove Product ID 1 | RemoveColumns |
| Remove Order ID-1 1 | RemoveColumns |
Action Name | Column Names |
|---|---|
| Remove Product ID 1 | Product ID |
| Remove Order ID-1 1 | Order ID-1 |
Action Name | Column Name | Rename |
|---|---|---|
| renamed Product ID-1 to Product ID 1 | Product ID-1 | Product ID |
Step Name | Step Type | Hyper Output File | TDS Output |
|---|---|---|---|
| Create 'Superstore Sales.hyper' | WriteToHyper | ~/My Tableau Prep Repository/Datasources/Superstore Sales.hyper | ~/My Tableau Prep Repository/Datasources/Superstore Sales.tds |